package com.zufe.khw;

public class Test {
    public static void main(String[] args) {
        int sum = getFactorial(5);
        System.out.println("sum = " + sum);
    }

    private static int getFactorial(int num) {
        if(num == 1){
            return 1;
        }
        return num * getFactorial(num - 1);
    }

    private static int getSum(int num) {
        if(num == 1){
            return 1;
        }
        return num + getSum(num - 1);
    }
}
